package com.itlong.cloud.equip.operate;

import com.itlong.cloud.POJO.DTO.operate.OperatePlanManageInfoDTO;
import com.itlong.cloud.POJO.DTO.operate.OperatePlanManagePageDTO;
import com.itlong.cloud.POJO.VO.operate.OperatePlanManageInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *      运营-智慧停车-设备方案管理服务接口暴露。
 * <desc/>
 *
 * @createDate 2018/11/05.
 */
@FeignClient(name = "equip-service")
public interface IOperatePlanManageServiceClient {

    /**
     * <desc>
     *      分页获取设备方案信息。
     * <desc/>
     *
     * @param  operatePlanManagePageDTO 参数请求对象
     * @return
     * @author Qiang.S
     * @createDate 2018/11/05
     */
    @RequestMapping(path = "/operate/parking/planManage/getPlanInfoPage" ,method = RequestMethod.POST)
    Page<OperatePlanManageInfoVO> getPlanInfoPage(@RequestBody OperatePlanManagePageDTO operatePlanManagePageDTO) throws Exception;

    /**
     * <desc>
     *      判断方案名称是否重复。
     * <desc/>
     *
     * @param  planName 方案名称
     * @param  planId 方案编号
     * @return
     * @author Qiang.S
     * @createDate 2018/11/05
     */
    @RequestMapping(path = "/operate/parking/planManage/checkPlanName" ,method = RequestMethod.POST)
    Integer checkPlanName(@RequestParam("planName")String planName,@RequestParam(value = "planId",required=false)String planId) throws Exception;

    /**
     * <desc>
     *      保存设备方案。
     * <desc/>
     *
     * @param  operatePlanManageInfoDTO 参数请求对象
     * @return
     * @author Qiang.S
     * @createDate 2018/11/05
     */
    @RequestMapping(path = "/operate/parking/planManage/save" ,method = RequestMethod.POST)
    Integer save(@RequestBody OperatePlanManageInfoDTO operatePlanManageInfoDTO) throws Exception;

    /**
     * <desc>
     *      更新设备方案。
     * <desc/>
     *
     * @param  operatePlanManageInfoDTO 参数请求对象
     * @return
     * @author Qiang.S
     * @createDate 2018/11/05
     */
    @RequestMapping(path = "/operate/parking/planManage/update" ,method = RequestMethod.POST)
    Integer update(@RequestBody OperatePlanManageInfoDTO operatePlanManageInfoDTO) throws Exception;

    /**
     * <desc>
     *      删除设备方案。
     * <desc/>
     *
     * @param  operatePlanManageInfoDTO 参数请求对象
     * @return
     * @author Qiang.S
     * @createDate 2018/11/05
     */
    @RequestMapping(path = "/operate/parking/planManage/delete" ,method = RequestMethod.POST)
    Integer delete(@RequestBody OperatePlanManageInfoDTO operatePlanManageInfoDTO) throws Exception;

    /**
     * <desc>
     *      根据方案编号获取名称
     * <desc/>
     *
     * @param planId 方案编号
     * @return
     * @author Qiang.S
     * @createDate 2018-09-25
     */
    @RequestMapping(path = "/operate/parking/planManage/getDetail" ,method = RequestMethod.POST)
    OperatePlanManageInfoVO getDetail(@RequestParam("planId") String planId) throws Exception;

}
